<?php
class ui_a_circle_hot extends ui {
	public function __construct($S, $param) {
		parent::__construct();
		
		$_GET['page'] = ($_GET['page']>1) ? $_GET['page'] : 1;
		
		$data_admin_article = new data_admin_article();
		$circles = $data_admin_article->ls_circle_hot($_GET['page'], 20);
		
		$S->assign('circles', $circles);
		
		
		$page = intval($_GET['page']);
		$start = $page - 10;
		$start = ($start>1) ? $start : 1;
		$end = $page + 10;
		
		for ($i=$start; $i<=$end; $i++) {
			$html .= '<a href="'.makeURL('page='.$i).'" style="'.(($_GET['page']==$i) ? 'font-size:14px; font-weight:bold;' : '').'">'.$i.'</a>';
		}
		$S->assign('page_html', $html);
	}
}
?>